#include <iostream>
#include <unistd.h>
#include "task.hpp"
#include "threadPool.hpp"

int main()
{
    xyl::ThreadPool<Task> *tp = new xyl::ThreadPool<Task>();
    tp->start();
    while (true)
    {
        tp->push_task(Task(2, 4, '*'));
        sleep(1);
        tp->push_task(Task(2, 5, '*'));
        sleep(1);
        tp->push_task(Task(2, 4, '/'));
        sleep(1);
        tp->push_task(Task(2, 4, '%'));
        sleep(1);
        tp->push_task(Task(6, 4, '*'));
        sleep(1);
        tp->push_task(Task(2, 0, '/'));
        sleep(1);
        tp->push_task(Task(2, 4, '+'));
        sleep(1);
    }
    delete tp;
    return 0;
}